//
//  Configuration.h
//  Scan
//
//  Created by 林波 on 2017/6/20.
//  Copyright © 2017年 林波. All rights reserved.
//

#ifndef Configuration_h
#define Configuration_h




#define UMID @"596dcbc0677baa4f9900147f"


/**********  网络配置    **********/

#define KOCRURL  @"http://172.19.0.211:9999/bpo-lgst/bpoInterface/getFTPInfo"


/**********  获取token    **********/
#define STSServer @"http://beta.es.onlyou.com/app/h5/sck/getOssConfig.json"

#define PACKETIDURL  @"http://beta.es.onlyou.com/app/h5/sck/createPacket.json"



#define AFNTimeOut 20


// 1 是可以修改 2 是不可以修改
#define KISMODIFY   1

//#define Base_URL         @"http://onlyouwxtest.onlyou.com:8080/onlyou-weixin/"
//#define Base_URL         @"http://test.ttdqy.onlyou.com:8080/onlyou-weixin/"
//#define Base_URL         @"http://test.ttdqy.onlyou.com/"             //测试站
//#define Base_URL         @"http://beta.ttdqy.onlyou.com/"             //beta站
//#define Base_URL          @"http://demo.es.app.onlyou.com/"             //demo环境
#define Base_URL          @"http://esapp.onlyou.com/"             //正式环境


#define KCHECKUSER       @"appRh/user/login/checkUser.json"
#define KGETVCODE        @"appRh/user/register/vcode.json"
#define KSENDPHONECODE   @"appRh/user/register/sendPhoneCode.json"
#define KRelINFO         @"app/user/userInfo/addUserSystemRelInfo.json"
#define KRESETPASSWORD   @"appRh/user/resetPassword/resetPassword.json"
#define KAUTOLOGIN       @"appRh/user/login/appTokenLogin.json"
#define KLOGIN           @"appRh/user/login/login.json"
#define KGETUSERSET      @"app/user/userInfo/getUserUploadSet.json"  //获取用户上传设置接口 参数 id(用户编号)
#define KUPUSERSET       @"app/user/userInfo/updateUserUploadSet.json"  //保存用户上传设置接口 参数 id(用户编号), uploadSet(用户上传设置 1: 限制上传 2: 不限制)
#define KRESETCHECKUSER   @"appRh/user/resetPassword/checkUser.json"
#define KREGISTINFO       @"appRh/user/resetPassword/validateRegistInfo.json"
#define KCHECKMOBILE      @"/appRh/user/register/checkMobile.json"
#define KCHECKUSERACTIVIA        @"app/user/userInfo/checkUserActivation.json"
#define KLOGOUT           @"appRh/user/login/logout.json"



#define KSCREENWIDTH    [UIScreen mainScreen].bounds.size.width
#define KSCREENHEIGHT   [UIScreen mainScreen].bounds.size.height




#define K_COLOR_RGBA(R,G,B,A)    [UIColor colorWithRed:R/255.0F green:G/255.0F blue:B/255.0F alpha:A]
#define K_COLOR_RGB(R,G,B)       K_COLOR_RGBA(R,G,B,1)
#define K_LINE_COLOR  K_COLOR_RGBA(235,235,235,1)
#define K_LIGHT_BLUE K_COLOR_RGBA(39,186,255,1)



#define KDocuments  [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]
#define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self;
#define KNTRELOADBILL         @"KNTRELOADBILL"
#define KNTRESHOWSETPASSWORD  @"KNTRESHOWSETPASSWORD"
#define KNTRELOGIN            @"KNTRELOGIN"
#define KNTRETAPPHONE         @"KNTRETAPPHONE"
#define KNTREUPOK             @"KNTREUPOK" 
#define KNTGETPOSTINDEX       @"KNTGETPOSTINDEX"
#define KNTGENETWORK          @"KNTGENETWORK"
#define KNTPUSHNOTIFICATION   @"KNTPUSHNOTIFICATION"
#define KMOVETOUPLOADINGLIST  @"KMOVETOUPLOADINGLIST"  //跳转识别中的列表
#define KMOVETOUPLOADEDLIST   @"KMOVETOUPLOADEDLIST"  //跳转到已识别列表
#define KREFRESHUPLOADEDLIST  @"KREFRESHUPLOADEDLIST"  //刷新已识别列表

#define KBTNTIMEDOWN  60

/****************************** 网络请求 ***************************************/

#define WEBVIEW_TIMEOUT 10
#define KREQUESTRUL   @"http://www.baidu.com"




/****************************** 用户信息 ***************************************/

#define KAPPLOGINIMAGEURL @"appLoginImgUrl"
#define KDOMAINNAME       @"domainName"
#define KID               @"id"
#define KLOGINBGFILEURL   @"loginBgFileUrl"
#define KLOGINLOGOFILEURL @"loginLogoFileUrl"
#define KNAME             @"name"
#define KUNIOID           @"unionId"
#define KMOBILE           @"mobile"
#define KTOKEN            @"token"
#define KUSERID           @"userId"
#define KUSERNAME         @"userName"
#define KHOMEURL          @"homeUrl"
#define KFTBUSERNAME      @"ftbUserName"
#define KFTBPASSWORD      @"ftbPassword"
#define KFTBURL           @"ftbURL"
#define KFTBPORT          @"ftbPort"
#define KFTBWORKDIR       @"ftbWorkDir"
#define KCORPID           @"corpId"
#define KCLIENTID         @"clientID"
#define KDEVICETOKEN      @"devicetoken"

#define KWIFI             @"kWIFI"
#define KFEERECOGNITIONID  @"0000000000000"
#define AppFeeRecognitionUploadAllUrl  @"AppFeeRecognitionUploadAllUrl"

/****************************** 个推推送 ***************************************/
#define kGtAppId           @"DuP3KJXXbv8epwLeJocZc5"
#define kGtAppKey          @"xaDFUMwu1l5m1kBJk90E7"
#define kGtAppSecret       @"c2JxhauNL6AXs8RALVnR01"


/****************************** AES加密Key ***************************************/
#define AESKEY  @"C40C69779E15780A"
#define ENCRYPTAES(str) [AESCipher encryptAES:str key:AESKEY]
#define DECRYPTAES(result) [AESCipher decryptAES:result key:AESKEY]

/****************************** 版本信息 ***************************************/
//App版本号
#define AppVersion  [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
#define APPTYPE  @"5"


/****************************** 数据保护 ***************************************/
//前后不出现空格
#define PREANDSUFNOBLANK(str)  [[Utilities safeString:str] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]

//空字符串
#define EMPTY(str) [Utilities isEmpty:str]
//不为空保护
#define SafeString(str) [Utilities safeString:str]

//首页是否存在
#define ISHOMEEXIST(isExist) AppDelegate *appDelegate = (AppDelegate*)[UIApplication sharedApplication].delegate; appDelegate.isHomeVCExist = isExist;

/****************************** 文件导入 ***************************************/

/****************************** 交互脚本 ***************************************/
#define JSInteractiveScript @"var chinaj = new Object();chinaj.module = 0;chinaj.param = '';    chinaj.startFunction = function(module,canshu){this.module = module;this.param = canshu;      window.location.href = 'IOS://'+this.module;};chinaj.loadCurrentType = function(){return this.module;}; chinaj.loadCurrentParam = function(){return this.param;};chinaj.appType=function(){return 'Onlyou'};"


//NSLOG
#ifdef DEBUG
#define NSLog(...) NSLog(__VA_ARGS__)
#else
#define NSLog(...)
#endif

#ifdef DEBUG

 #define KBUGLY @"b45aeb7558"

#else

 #define KBUGLY @"b45aeb7558"

#endif




#endif /* Configuration_h */


#ifndef    weakify
#define weakify(x) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wshadow\"") \
autoreleasepool{} __weak typeof(x) __weak_##x##__ = x; \
_Pragma("clang diagnostic pop")
#endif


#ifndef    strongify
#define strongify(x) \
_Pragma("clang diagnostic push") \
_Pragma("clang diagnostic ignored \"-Wshadow\"") \
try{} @finally{} __strong typeof(x) x = __weak_##x##__; \
_Pragma("clang diagnostic pop")

#endif
